package com.ruoyi.common.entity.TransactionEntity.VO;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * SPU带价格VO
 *
 * @author ruoyi
 */
public class SpuWithPrice extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** SPU ID */
    private Long id;

    /** 所属分类ID（关联 category） */
    private Long categoryId;

    /** 商品名称，如：伊利纯牛奶 */
    @Excel(name = "商品名称")
    private String name;

    /** 品牌名称，如：伊利、金龙鱼 */
    @Excel(name = "品牌名称")
    private String brandName;

    /** 商品单位，如瓶、袋、箱 */
    @Excel(name = "商品单位")
    private String unit;

    /** 商品描述 */
    @Excel(name = "商品描述")
    private String description;

    /** 商品图片地址（多张图使用逗号分隔） */
    private String imageUrls;

    /** 条形码（部分平台用于识别） */
    private String barcode;

    /** 是否上架（0-下架，1-上架） */
    @Excel(name = "是否上架", readConverterExp = "0=下架,1=上架")
    private String isActive;

    /** 删除标志（0-未删除，1-已删除） */
    private String delFlag;

    /** 对应最低sku的价格 */
    @Excel(name = "最低价格")
    private BigDecimal price;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    // Getters and Setters
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getImageUrls() {
        return imageUrls;
    }

    public void setImageUrls(String imageUrls) {
        this.imageUrls = imageUrls;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getIsActive() {
        return isActive;
    }

    public void setIsActive(String isActive) {
        this.isActive = isActive;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public Date getUpdateTime() {
        return updateTime;
    }

    @Override
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}